#pragma once

#include "cocos2d.h"
#include <Box2D/Box2D.h>

USING_NS_CC;

class ICharacter;


namespace ACTION
{
	enum TYPE
	{
		STD		= 1,
		WLK		= 2,
		ATT		= 100,
	};
}

class CActionBase
{
public:
	virtual void Init(UINT lifetime, ICharacter* owner);

	virtual ACTION::TYPE GetType()=0;

	virtual void Enter(ICharacter* owner)=0;
	virtual void Process(ICharacter* owner)=0;
	virtual void Exit(ICharacter* owner)=0;
};

class CStdAction : public CActionBase
{
public:
	ACTION::TYPE GetType(){ return ACTION::STD; }

	virtual void Enter(ICharacter* owner);
	virtual void Process(ICharacter* owner){};
	virtual void Exit(ICharacter* owner){};

	static CStdAction* GetInstance();
};

class CWlkAction: public CActionBase
{
public:
	ACTION::TYPE GetType(){ return ACTION::WLK; }

	virtual void Enter(ICharacter* owner);
	virtual void Process(ICharacter* owner){};
	virtual void Exit(ICharacter* owner){};

	static CWlkAction* GetInstance();
};

class CAttAction: public CActionBase
{
public:
	ACTION::TYPE GetType(){ return ACTION::ATT; }

	virtual void Enter(ICharacter* owner);
	virtual void Process(ICharacter* owner){};
	virtual void Exit(ICharacter* owner);

	static CAttAction* GetInstance();
};